Auto merge of #1505 - alexcrichton:issue-1478, r=brson
authorbors <bors@rust-lang.org>
Wed, 29 Apr 2015 18:51:34 +0000 (18:51 +0000)
committerbors <bors@rust-lang.org>
Wed, 29 Apr 2015 18:51:34 +0000 (18:51 +0000)
This commit enables the build script for a crate to provide feedback to the
crate itself about how it should be built. This is done through the `--cfg`
flags of the compiler, and each build script is now allowed to print `rustc-cfg`
directives to inform Cargo about what `--cfg` flags it should pass.

All `--cfg` flags are local to the current crate and are not propagated outwards
to transitive dependencies. The primary use-case that this feature is targeting
is compile-time feature detection for applications like C bindings or C
libraries where the version being targeted may change over time.

Closes #1478

1  2 
src/cargo/ops/cargo_compile.rs
src/doc/build-script.md

Simple merge
Simple merge